import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login";
import Manager from "@/components/Manager";
import NewsList from "@/components/news/NewsList";
import AddNews from "@/components/news/AddNews";
import CategoryList from "@/components/category/CategoryList";
import  AddCategory from "@/components/category/AddCategory";
import CommentList from "@/components/comment/CommentList";
import  AddComment from "@/components/comment/AddComment";
import UserList from "@/components/user/UserList";
import  AddUser from "@/components/user/AddUser";
import OrderList from "@/components/order/OrderList";
import  AddOrder from "@/components/order/AddOrder";
import FoodList from "@/components/food/FoodList";
import  AddFood from "@/components/food/AddFood";
import  FoodDetail from "@/components/food/FoodDetail";
import MyCart from "@/components/cart/MyCart";
import MyOrder from "@/components/cart/OrderList";
import OrderItemList from "@/components/order/OrderItemList";

Vue.use(Router)

export default new Router({
  routes: [
    {path: "/", component: Login},
    {
      path: "/manager", component: Manager,
      children:[
        {path:"/news/NewsList",component:NewsList},
        {path:"/news/AddNews",component:AddNews},
        {path:"/comment/CommentList",component:CommentList},
        {path:"/comment/AddComment",component:AddComment},
        {path:"/category/CategoryList",component:CategoryList},
        {path:"/category/AddCategory",component:AddCategory},
        {path:"/food/FoodList",component:FoodList},
        {path:"/food/AddFood",component:AddFood},
        {path:"/order/OrderList",component:OrderList},
        {path:"/order/AddOrder",component:AddOrder},
        {path:"/user/UserList",component:UserList},
        {path:"/user/AddUser",component:AddUser},
        {path:"/food/FoodDetail",component:FoodDetail},
        {path:"/cart/MyCart",component:MyCart},
        {path:"/cart/MyOrder",component:MyOrder},
        {path:"/order/OrderItemList",component:OrderItemList},

      ]
    }
  ]
})
